/**
 * Copyright (c) Huawei Technologies Co., Ltd. 2025. All rights reserved.
 * This file is a part of the CANN Open Software.
 * Licensed under CANN Open Software License Agreement Version 2.0 (the "License").
 * Please refer to the License for details. You may not use this file except in compliance with the License.
 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
 * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
 * See LICENSE in the root of the software repository for the full text of the License.
 */

/* !
 * \file quant_batch_matmul_v4_tiling_key.h
 * \brief
 */

#ifndef QUANT_BATCH_MATMUL_V4_TILING_KEY_H
#define QUANT_BATCH_MATMUL_V4_TILING_KEY_H

#include "ascendc/host_api/tiling/template_argument.h"

#define QUANT_BATCH_MATMUL_V4_NOT_TRANS 0
#define QUANT_BATCH_MATMUL_V4_B_TRANS 1
#define QUANT_BATCH_MATMUL_V4_A_TRANS 2
#define QUANT_BATCH_MATMUL_V4_ALL_TRANS 3

#define QUANT_BATCH_MATMUL_V4_QUANT_TYPE_NONE 0
#define QUANT_BATCH_MATMUL_V4_PER_TENSOR 1
#define QUANT_BATCH_MATMUL_V4_PER_CHANNEL 2
#define QUANT_BATCH_MATMUL_V4_PER_GROUP 3
#define QUANT_BATCH_MATMUL_V4_MX 4

#define QUANT_BATCH_MATMUL_V4_OPTION_ATTR_NONE 0
#define QUANT_BATCH_MATMUL_V4_HAS_ANTIQUANT_OFFSET 1

#define QUANT_BATCH_MATMUL_V4_NOT_WEIGHT_NZ 0
#define QUANT_BATCH_MATMUL_V4_IS_WEIGHT_NZ 1

#define QUANT_BATCH_MATMUL_V4_MSD_BASIS 0
#define QUANT_BATCH_MATMUL_V4_PERBLOCK_BASIS 1
#define QUANT_BATCH_MATMUL_V4_PERGROUP_BASIS 2

ASCENDC_TPL_ARGS_DECL(
    QuantBatchMatmulV4,
    ASCENDC_TPL_UINT_DECL(
        TRANS, ASCENDC_TPL_2_BW, ASCENDC_TPL_UI_LIST, QUANT_BATCH_MATMUL_V4_NOT_TRANS, QUANT_BATCH_MATMUL_V4_B_TRANS, QUANT_BATCH_MATMUL_V4_A_TRANS, QUANT_BATCH_MATMUL_V4_ALL_TRANS),
    ASCENDC_TPL_UINT_DECL(
        QUANT_TYPE, ASCENDC_TPL_4_BW, ASCENDC_TPL_UI_LIST, QUANT_BATCH_MATMUL_V4_QUANT_TYPE_NONE, QUANT_BATCH_MATMUL_V4_PER_TENSOR, QUANT_BATCH_MATMUL_V4_PER_CHANNEL, QUANT_BATCH_MATMUL_V4_PER_GROUP, QUANT_BATCH_MATMUL_V4_MX),
    ASCENDC_TPL_UINT_DECL(
        OPTION_ATTRS, ASCENDC_TPL_2_BW, ASCENDC_TPL_UI_LIST, QUANT_BATCH_MATMUL_V4_OPTION_ATTR_NONE, QUANT_BATCH_MATMUL_V4_HAS_ANTIQUANT_OFFSET),
    ASCENDC_TPL_UINT_DECL(
        WEIGHTNZ, ASCENDC_TPL_1_BW, ASCENDC_TPL_UI_LIST, QUANT_BATCH_MATMUL_V4_NOT_WEIGHT_NZ, QUANT_BATCH_MATMUL_V4_IS_WEIGHT_NZ),
    ASCENDC_TPL_UINT_DECL(
        KERNEL_TEMPLATE_TYPE, ASCENDC_TPL_4_BW, ASCENDC_TPL_UI_LIST, QUANT_BATCH_MATMUL_V4_MSD_BASIS, QUANT_BATCH_MATMUL_V4_PERBLOCK_BASIS, QUANT_BATCH_MATMUL_V4_PERGROUP_BASIS), );
ASCENDC_TPL_SEL(
    ASCENDC_TPL_ARGS_SEL(
        ASCENDC_TPL_KERNEL_TYPE_SEL(ASCENDC_TPL_MIX_AIC_1_2),
        ASCENDC_TPL_UINT_SEL(TRANS, ASCENDC_TPL_UI_LIST, QUANT_BATCH_MATMUL_V4_NOT_TRANS),
        ASCENDC_TPL_UINT_SEL(QUANT_TYPE, ASCENDC_TPL_UI_LIST, QUANT_BATCH_MATMUL_V4_MX),
        ASCENDC_TPL_UINT_SEL(OPTION_ATTRS, ASCENDC_TPL_UI_LIST, QUANT_BATCH_MATMUL_V4_OPTION_ATTR_NONE),
        ASCENDC_TPL_UINT_SEL(WEIGHTNZ, ASCENDC_TPL_UI_LIST, QUANT_BATCH_MATMUL_V4_NOT_WEIGHT_NZ),
        ASCENDC_TPL_UINT_SEL(KERNEL_TEMPLATE_TYPE, ASCENDC_TPL_UI_LIST, QUANT_BATCH_MATMUL_V4_MSD_BASIS), ),
    ASCENDC_TPL_ARGS_SEL(
        ASCENDC_TPL_KERNEL_TYPE_SEL(ASCENDC_TPL_MIX_AIC_1_2),
        ASCENDC_TPL_UINT_SEL(TRANS, ASCENDC_TPL_UI_LIST, QUANT_BATCH_MATMUL_V4_B_TRANS),
        ASCENDC_TPL_UINT_SEL(QUANT_TYPE, ASCENDC_TPL_UI_LIST, QUANT_BATCH_MATMUL_V4_MX),
        ASCENDC_TPL_UINT_SEL(OPTION_ATTRS, ASCENDC_TPL_UI_LIST, QUANT_BATCH_MATMUL_V4_OPTION_ATTR_NONE),
        ASCENDC_TPL_UINT_SEL(WEIGHTNZ, ASCENDC_TPL_UI_LIST, QUANT_BATCH_MATMUL_V4_NOT_WEIGHT_NZ),
        ASCENDC_TPL_UINT_SEL(KERNEL_TEMPLATE_TYPE, ASCENDC_TPL_UI_LIST, QUANT_BATCH_MATMUL_V4_PERBLOCK_BASIS), ), 
    ASCENDC_TPL_ARGS_SEL(
        ASCENDC_TPL_KERNEL_TYPE_SEL(ASCENDC_TPL_MIX_AIC_1_2),
        ASCENDC_TPL_UINT_SEL(TRANS, ASCENDC_TPL_UI_LIST, QUANT_BATCH_MATMUL_V4_NOT_TRANS),
        ASCENDC_TPL_UINT_SEL(QUANT_TYPE, ASCENDC_TPL_UI_LIST, QUANT_BATCH_MATMUL_V4_MX),
        ASCENDC_TPL_UINT_SEL(OPTION_ATTRS, ASCENDC_TPL_UI_LIST, QUANT_BATCH_MATMUL_V4_OPTION_ATTR_NONE),
        ASCENDC_TPL_UINT_SEL(WEIGHTNZ, ASCENDC_TPL_UI_LIST, QUANT_BATCH_MATMUL_V4_NOT_WEIGHT_NZ),
        ASCENDC_TPL_UINT_SEL(KERNEL_TEMPLATE_TYPE, ASCENDC_TPL_UI_LIST, QUANT_BATCH_MATMUL_V4_PERGROUP_BASIS), ), );
#endif // QUANT_BATCH_MATMUL_V4_TILING_KEY_H